﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace SadlandVillage.Core.Helper
{
    public static class StringEffects
    {
        /// <summary>
        /// Prints a string on the screen with a shadow.
        /// </summary>
        /// <param name="sBatch">Sprite Batch responsible for drawing the string</param>
        /// <param name="font">Font to print the string with</param>
        /// <param name="text">Text to be drawn</param>
        /// <param name="position">Position on the screen where the text should be positioned</param>
        /// <param name="textColor">Color of the text</param>
        /// <param name="shadowColor">Color of the shadow</param>
        /// <param name="shadowShift">Distance from the text to the shadow</param>
        /// Requires the Sprite Batch to be already started with a "Begin"
        public static void PrintShadowedString(SpriteBatch sBatch, SpriteFont font, string text, Vector2 position, Color textColor, Color shadowColor, int shadowShift)
        {
            sBatch.DrawString(font, text, new Vector2(position.X+shadowShift, position.Y+shadowShift), shadowColor);
            sBatch.DrawString(font, text, position, textColor);
        }
    }
}
